<?php

use App\H5\Controllers\Taoke\TaokeCommonController;
use App\Http\Controllers\Api\CommonController;
use Illuminate\Support\Facades\Route;

use App\Shuixing\Controllers\IndexController as IndexController;
use App\Shuixing\Controllers\HotController as HotController;
use App\Shuixing\Controllers\TagController as TagController;
use App\Shuixing\Controllers\DesignController as DesignController;
use App\Shuixing\Controllers\ContactController as ContactController;
use App\Shuixing\Controllers\CircleController as CircleController;
use App\Shuixing\Controllers\CirclesController as CirclesController;
use App\Shuixing\Controllers\ClauseController as ClauseController;
use App\Shuixing\Controllers\LoginController as LoginController;
use App\Shuixing\Controllers\SearchController as SearchController;
use App\Shuixing\Controllers\SingleController as SingleController;
use App\Shuixing\Controllers\ToolController as ToolController;
use App\Shuixing\Controllers\LostController as LostController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', [IndexController::class, 'index'])->middleware('web.mode.process');
Route::get('/hot', [HotController::class, 'index'])->middleware('web.mode.process');
Route::get('/tag/{id?}', [TagController::class, 'index'])->middleware('web.mode.process');
Route::get('/design/{id?}', [DesignController::class, 'index'])->middleware('web.mode.process');
Route::get('/contact', [ContactController::class, 'index'])->middleware('web.mode.process');
Route::get('/circles/{id?}', [CirclesController::class, 'index'])->middleware('web.mode.process');
Route::get('/circle/{id}', [CircleController::class, 'index'])->middleware('web.mode.process');
Route::get('/clause/{id}', [ClauseController::class, 'index'])->middleware('web.mode.process');
Route::get('/login', [LoginController::class, 'index'])->middleware('web.mode.process');
Route::get('/search/{id}/{keyword?}', [SearchController::class, 'index'])->middleware('web.mode.process');
Route::get('/single/{id?}', [SingleController::class, 'index'])->middleware('web.mode.process');
Route::get('/tool/{id?}', [ToolController::class, 'index'])->middleware('web.mode.process');
Route::get('/404', [LostController::class, 'index'])->middleware('web.mode.process');

//PC --api
Route::get('/wx_login_code', [IndexController::class, 'wxLoginCode']);
Route::get('/wx_login', [IndexController::class, 'wxLogin']);
Route::get('/pc_login', [IndexController::class, 'pcLogin']);
Route::get('/pc_userinfo', [LoginController::class, 'pcUserinfo']);


// webview
Route::get('/common/webview', [CommonController::class, 'webview']);
Route::get('/common/webview/to/{action}/{unique}', [CommonController::class, 'towebview']);
Route::get('/common/webview/action', [CommonController::class, 'webviewAction']);

//common
Route::get('/common/clause', [CommonController::class, 'clause']);
Route::get('/common/download', [CommonController::class, 'download'])->name('download');

// H5
// 淘客
Route::get('/h5/taoke/realhot', [TaokeCommonController::class, 'realhot']);
Route::get('/h5/taoke/flashsale', [TaokeCommonController::class, 'flashsale']);
Route::get('/h5/taoke/billionsubsidy', [TaokeCommonController::class, 'billionsubsidy']);
Route::get('/h5/taoke/packaging9_9', [TaokeCommonController::class, 'packaging9_9']);
Route::get('/h5/taoke/threadreport', [TaokeCommonController::class, 'threadreport']);